package thread.java20230106;

import java.util.Date;
import java.util.Timer;
import java.util.TimerTask;

public class Demo41 {
    public static void main(String[] args) {
        Timer timer = new Timer();
        timer.scheduleAtFixedRate(new TimerTask() {
            @Override
            public void run() {
                System.out.println("hello timer " + new Date());
            }
        },new Date(System.currentTimeMillis() - 5000), 1000);

    }
}
